import UIEffect from "./UIEffect";

const { ccclass, menu, property } = cc._decorator;

@ccclass
@menu('自定义组件/缩放')
export default class UIEffectscale extends UIEffect {
    @property()
    from: number = 0.01;
    @property()
    to: number = 1;
    @property()
    duration: number = 0.3;

    init() {
        this.node.scale = this.from;
        return cc.scaleTo(this.duration, this.to).easing(cc.easeBackOut());
    }

    disable() {
        return cc.scaleTo(this.duration, this.from);
    }
}
